package com.caiwangdai.app.ui.home.repay.list

import com.caiwangdai.app.backend.Command
import com.caiwangdai.app.backend.RetrofitHome
import com.caiwangdai.app.backend.observer.OnPageObserver
import com.caiwangdai.app.backend.rx.RxSchedulers
import com.caiwangdai.app.bean.RepaymentB

class BorrowCommand : Command<RepaymentB> {

    constructor() : super()

    override fun execute(pageNumber: String, pageSize: String, observer: OnPageObserver<RepaymentB>) {
        RetrofitHome.getHomeApi()
                .getRepayList()
                .compose(RxSchedulers.toMain())
                .subscribe(observer)
    }
}